package com.twu.biblioteca;

/******
 * Created by saylward on 7/03/2014.
 */
public class Item
{
    protected String name;
    protected boolean isCheckedOut;
    protected String checkedOutBy;

    public Item(String name)
    {
        this.name = name;
        isCheckedOut = false;
        checkedOutBy = "";
    }

    public String getName()
    {
        return name;
    }

    public boolean getCheckedOut()
    {
        return isCheckedOut;
    }

    public void checkOut(String checkedOutBy)
    {
        isCheckedOut = true;
        this.checkedOutBy = checkedOutBy;
    }

    public void returnThis()
    {
        isCheckedOut = false;
        this.checkedOutBy = "";
    }

    public String getCheckedOutBy()
    {
        return checkedOutBy;
    }
}
